#pragma once
#include <iostream>
#include "Util.h"

#define XNCC_DEBUG

template <typename... Args>
void DebugAssert(const bool first, const Args&... args)
{
    if (!first) {
        std::cerr << "Assertion failed: " << xncc::shared::concatToString(args...) << std::endl;
        std::abort();
    }
}

#ifdef XNCC_DEBUG

#    define debug_assert(expr, args...) DebugAssert(!!(expr), __FILE__, ":", __LINE__, ":", __FUNCTION__, ":", ##args)
#else
#    define debug_assert(expr, args...)
#endif
